import request from '@/utils/request'

// 获取实时同步状态
export function getRealTimeSyncStatus() {
  return request({
    url: '/monitor/realtime',
    method: 'get'
  })
}

// 获取同步性能监控数据
export function getSyncPerformanceMonitor(params) {
  return request({
    url: '/monitor/performance',
    method: 'get',
    params
  })
}

// 获取报警记录列表
export function getAlertList(params) {
  return request({
    url: '/monitor/alert',
    method: 'get',
    params
  })
}

// 获取报警记录详情
export function getAlertDetail(id) {
  return request({
    url: `/monitor/alert/${id}`,
    method: 'get'
  })
}

// 标记报警为已读
export function markAlertAsRead(id) {
  return request({
    url: `/monitor/alert/${id}/read`,
    method: 'put'
  })
}